package com.it.im.users.controller;

import com.im.it.utils.R;
import com.it.im.users.entity.User;
import com.it.im.users.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author new
 * @date 2023/8/9 16:36
 */
@RestController
@RequestMapping("/im-it/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/all")
    public R<List<User>> findAll() {
        return R.success(userService.findAll());
    }

}
